﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nage.Algorithms.Solution;
using Nage.Algorithms.Population;

namespace Nage.Algorithms.Evolution
{
    /// <summary>
    /// Evolution interface. By implementing it the user can
    /// define how population evolves in time
    /// </summary>
    /// <typeparam name="TSol">Type of the solution</typeparam>
    public interface IEvolution<TSol> where TSol : ISolution
    {       
        /// <summary>
        /// Evolves the current population into the next generation by
        /// providing typical generation shift behaviour.
        /// </summary>
        /// <param name="population">Current population</param>
        /// <returns>Next generation population</returns>
        IPopulation<TSol> Evolve(IPopulation<TSol> population);
    }
}
